package com.yet.kotlinapp.modules.home

import com.yet.kotlinapp.entity.BannerResponseInfo
import com.yet.kotlinapp.modules.home.inter.HomePresente
import com.yet.kotlinapp.modules.home.inter.HomeView
import com.yet.kotlinapp.modules.login.inter.LoginView

/**
 *
 * @ProjectName: Kotlin app
 * @Package: com.yet.kotlinapp.modules.home
 * @ClassName: HomePresentImp
 * @Description: java类作用描述
 * @Author: liys
 * @CreateDate: 2021/8/30 17:49
 * @UpdateUser: 更新者
 * @UpdateDate: 2021/8/30 17:49
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
class HomePresentImp(var view:HomeView):HomePresente,HomePresente.onbanner {

   var  homeModelImp: HomeModelImp = HomeModelImp()
    override fun getBanner() {
            homeModelImp.getBanner(this)
    }

    override fun onSuccess(msg: BannerResponseInfo ?) {
        if(msg?.data==null){
            if (msg != null) {
                view.getBannerSuccess(msg)
            }
        }else{
            view.getBannerFairl(msg.errorMsg)
        }

    }

    override fun onFairl(msg: String) {
        view.getBannerFairl(msg)
    }


}